function myAjax(url, data, type) {
    let result = null;
    $.ajax({
        url: "http://localhost:8080" + url,
        data: data,//key  value
        type: type,//所有新增，删除，修改全部用post，查询全部用get
        dataType: 'json',//后台传递给前端的数据类型
        async: false,
        xhrFields: {
            withCredentials: true //允许跨域带Cookie
        },
        success: function (data) {
            result = data;
        }
    });
    return result;
}
function myFileAjax(url, data, type) {
    let result = null;
    $.ajax({
        url: "http://localhost:8080" + url,
        data: data,//key  value
        type: type,//所有新增，删除，修改全部用post，查询全部用get
        dataType: 'json',//后台传递给前端的数据类型
        async: false,
        processData: false,
        contentType: false,
        xhrFields: {
            withCredentials: true //允许跨域带Cookie
        },
        success: function (data) {
            result = data;
        }
    });
    return result;
}
